//
//  MyResumeCollectionViewCell.m
//  eshow
//
//  Created by Hisoka on 15/12/28.
//  Copyright © 2015年 Hisoka. All rights reserved.
//

#import "MyResumeCollectionViewCell.h"

@implementation MyResumeCollectionViewCell

- (id) initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.bgImg = [UIImageView newAutoLayoutView];
        [self addSubview:_bgImg];
        
        [_bgImg autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self];
        [_bgImg autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self];
        [_bgImg autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self];
        [_bgImg autoPinEdge:ALEdgeRight toEdge:ALEdgeRight ofView:self];
        
        self.titleV = [UIView newAutoLayoutView];
        [self addSubview:_titleV];
        
        [_titleV autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self];
        [_titleV autoAlignAxis:ALAxisVertical toSameAxisOfView:self];
        [_titleV autoSetDimensionsToSize:CGSizeMake(self.frame.size.width, 40)];
        
        _titleV.backgroundColor = [UIColor blackColor];
        _titleV.alpha = 0.8;
        
        self.titleLB = [UILabel newAutoLayoutView];
        [_titleV addSubview:_titleLB];
        
        [_titleLB autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:_titleV];
        [_titleLB autoAlignAxis:ALAxisVertical toSameAxisOfView:_titleV withOffset:5];
        [_titleLB autoSetDimensionsToSize:CGSizeMake(self.frame.size.width, 30)];
        
        _titleLB.backgroundColor = [UIColor clearColor];
        _titleLB.textColor = GRAY_COLOR;
        _titleLB.font = FONT_SIZE_14;
        
        self.dateLB = [UILabel newAutoLayoutView];
        [_titleV addSubview:_dateLB];
        
        [_dateLB autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:_titleLB];
        [_dateLB autoAlignAxis:ALAxisVertical toSameAxisOfView:_titleV withOffset:5];
        [_dateLB autoSetDimensionsToSize:CGSizeMake(self.frame.size.width, 10)];
        
        _dateLB.backgroundColor = [UIColor clearColor];
        _dateLB.textColor = GRAY_COLOR;
        _dateLB.font = [UIFont systemFontOfSize:8.0f];
        
    }
    
    return self;
}

@end
